package com.mohammad.fun.dtpkrisgethin;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;

public class arm extends Activity {
	
	Intent intent;

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.arm);
		
		//Getting the URL to work
				String video_path = "http://www.youtube.com/watch?v=0ntppTAOuzs";
		        Uri uri = Uri.parse(video_path);

		        // With this line the youtube application, if installed, will launch immediately.
		        // Without it you will be prompted with a list of the application to choose.
		        uri = Uri.parse("vnd.youtube:"  + uri.getQueryParameter("v"));

		        intent = new Intent(Intent.ACTION_VIEW, uri);
		
		
	}
	
	public void btn_watchVideo (View v){
		 startActivity(intent);
	 }

}
